package com.hq.learnmybatisplus.config;

import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 乐观锁插件
 * @see com.hq.learnmybatisplus.LockTest
 * @author hq
 */
@Configuration
public class OptimisticLockConfig {

    @Bean
    public OptimisticLockerInterceptor optimisticLocker(){
        return new OptimisticLockerInterceptor();
    }
}
